package com.gxa.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zhuiyi
 * @since 2022-10-29 04:01:04
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value = "User对象", description = "用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("昵称")
    @TableField("nickname")
    private String nickname;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("联系电话")
    @TableField("mobile")
    private String mobile;

    @ApiModelProperty("状态 0有效 1锁定")
    @TableField("user_status")
    private Boolean userStatus;

    @ApiModelProperty("最近访问时间")
    @TableField("last_login_time")
    private Date lastLoginTime;

    @ApiModelProperty("性别 0男 1女 2保密")
    @TableField("gender")
    private String gender;

    @ApiModelProperty("主题")
    @TableField("theme")
    private String theme;

    @ApiModelProperty("头像")
    @TableField("avatar")
    private String avatar;

    @ApiModelProperty("描述")
    @TableField("user_description")
    private String userDescription;

    @ApiModelProperty("盐值")
    @TableField("salt")
    private String salt;

    @ApiModelProperty("创建人")
    @TableField("creator")
    private Long creator;

    @ApiModelProperty("创建人姓名")
    @TableField("creator_name")
    private String creatorName;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time")
    private Date createTime;

    @ApiModelProperty("更新人")
    @TableField("updator")
    private Long updator;

    @ApiModelProperty("更新人姓名")
    @TableField("updator_name")
    private String updatorName;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("是否删除 0-正常 1-被删除")
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;


}
